<template>
    <div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>单位名称</label>
            </div>
            <div>
                <p>{{detailData.ProjectName}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>区域</label>
            </div>
            <div>
                <p>{{detailData.Aera}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>职业病危害因素</label>
            </div>
            <div>
                <p>{{detailData.OccHealthHarm}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>采样/测量地点</label>
            </div>
            <div>
                <p>{{detailData.CheckAddress}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>开始监测时间</label>
            </div>
            <div>
                <p>{{detailData.StaterCheckDate?detailData.StaterCheckDate.split(' ')[0]:''}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>结束监测时间</label>
            </div>
            <div>
                <p>{{detailData.EndCheckDate?detailData.EndCheckDate.split(' ')[0]:''}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>测量指标</label>
            </div>
            <div>
                <p>{{detailData.CheckIndex}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>测量值</label>
            </div>
            <div>
                <p>{{detailData.CheckValue}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>职业接触限值</label>
            </div>
            <div>
                <p>{{detailData.OccContactImpose}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>监测负责人</label>
            </div>
            <div>
                <p>{{detailData.CheckFzr}}</p>
            </div>
        </div>
        <div class="form-item form-item-style1">
            <div class="label-title">
                <label>是否超标</label>
            </div>
            <div class="select-section">
                <div :class="{'active':detailData.IsCb == '合格'}">
                    合格
                </div>
                <div :class="{'active':detailData.IsCb !== '合格'}">
                    超标
                </div>
            </div>
        </div>
        <myMenu></myMenu>
    </div>
</template>
<script>
import myMenu from '@/commonComponents/menu'
export default {
    name: 'recordDetail',
    components: {
        myMenu
    },
    data () {
        return {
            userInfo: {},
            detailData: {}
        }
    },
    created () {
        this.userInfo = JSON.parse(localStorage.getItem('userInfo'))
        this.getDetail()
    },
    methods: {
        getDetail () {
            let params = {
                'allowPaging': true,
                'business': 'GetOccHealthSup',
                'data': {
                    'BusinessType': '2', // 2: 职业病危害因素详细
                    'Id': this.$route.query.id
                },
                'pageIndex': 0,
                'pageSize': 0,
                'tokenId': '',
                'userId': this.userInfo.userid
            }
            this.$axiosAjax.getConfigJson(params)
                .then((res) => {
                    if (res.data.code === 0) {
                        this.detailData = res.data.data
                    }
                }).catch((response) => {
                })
        }
    }
}
</script>
<style scoped>
.rightmsg {
    color: #999;
}
</style>
